/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package ws;

import ejb.facade.CategoriaFacadeLocal;
import entities.Categoria;
import java.util.List;
import javax.ejb.EJB;
import javax.ejb.Stateless;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;

/**
 *
 * @author sflesca
 */
@WebService(serviceName = "WebServiceCategorie")
@Stateless()
public class WebServiceCategorie {
    @EJB
    private CategoriaFacadeLocal categoriaFacade;

    /**
     * This is a sample web service operation
     */
    @WebMethod(operationName = "hello")
    public String hello(@WebParam(name = "name") String txt) {
        return "Hello " + txt + " !";
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "getCategorie")
    public List<Categoria> getCategorie() {
        return categoriaFacade.findAll();
    }
    
    
}
